<?php
/**
 * This file is form http://findcat.cn
 *
 * @link     https://findcat.cn
 * @email    1476982312@qq.com
 */
namespace Blog\Seeder\Admin\Test;

use Carbon\Carbon;
use App\Models\Category;
use Illuminate\Database\Seeder;

class CategoryTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run()
    {
        $data = [
            [
                'admin_user_id' => 2,
                'name'          => '前端技术',
                'description'   => 'web前端，Vue，JavaScript，HTML，css等技术文章',
                'sort'          => 1,
                'created_at'    => Carbon::now(),
                'updated_at'    => Carbon::now(),
            ],
            [
                'admin_user_id' => 2,
                'name'          => '后端开发',
                'description'   => 'GoLang，PHP，python，Java等技术文章',
                'sort'          => 2,
                'created_at'    => Carbon::now(),
                'updated_at'    => Carbon::now(),
            ],
            [
                'admin_user_id' => 2,
                'name'          => '操作系统',
                'description'   => 'Linux服务器搭建，Linux操作技巧，Windows小技巧等文章',
                'sort'          => 3,
                'created_at'    => Carbon::now(),
                'updated_at'    => Carbon::now(),
            ],
            [
                'admin_user_id' => 2,
                'name'          => '杂七杂八',
                'description'   => '单片机，随言碎语，生活小记，搞笑视频等生活琐事',
                'sort'          => 4,
                'created_at'    => Carbon::now(),
                'updated_at'    => Carbon::now(),
            ],
            [
                'admin_user_id' => 2,
                'name'          => '关于我',
                'description'   => '关于作者的履历，联系方式，作者介绍等信息',
                'sort'          => 5,
                'created_at'    => Carbon::now(),
                'updated_at'    => Carbon::now(),
            ],
        ];

        Category::query()->insert($data);
    }
}
